﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SWENAssignment.Classes;

namespace SWENAssignment
{
    public partial class listAllDetailsByRoomNumber : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            GuestDetails g = DBmanager.GetDetailsByRoomNumber(tbxSearchByRoomNo.Text);
            if (g != null)
            {
                lblLastName.Text = g.LastName;
                lblFirstName.Text = g.FirstName;
                lblNumAdult.Text = Convert.ToString(g.NumOfAdults);
                lblNumChildren.Text = Convert.ToString(g.NumOfChildren);
                lblContactNo.Text = Convert.ToString(g.ContactNo);
                lblAddress.Text = g.Address;
                lblEmail.Text = g.Email;
            }
        }

        protected void tbxSearchByRoomNo_TextChanged(object sender, EventArgs e)
        {

        }
    }
}